package com.dfbz.demo01_卖票案例;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo02_Runnable实现线程 {
    public static void main(String[] args) {

        // 我们的任务
        Runnable runnable=new MyRunnable();

        Thread thread=new Thread(runnable);
        thread.start();

        for (int i = 0; i < 10000; i++) {
            System.out.println("main...");
        }

    }
}
class MyRunnable implements Runnable{

    private int num=100;
    @Override
    public void run() {
        for (int i = 0; i < 10000; i++) {
            System.out.println("runnable....");
        }
    }
}


